Method for parsing, indexing and searching world-wide-web pages

ABSTRACT

A system for indexing stored information includes a processor and memory. The processor parses the information into indexable words. Each word represents either a portion of the information or an attribute of one or more portions of the information. The memory stores index entries. Each index entry includes a word entry representing a unique one of the words, and one or more location entries indicating a location of the unique word within the information.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of application Ser. No. 08/696,406filed on Aug. 9, 1996, now U.S. Pat. No. 5,864,863.

FIELD OF THE INVENTION

This invention relates generally to indexing and searching databases,and more particularly to indexing and searching extremely largedatabases which are increasing in size.

BACKGROUND OF THE INVENTION

In the prior art, it has been well known that computer systems can beused to manage indices to records of databases. Many techniques areknown to parse, index and search databases. However, managing extremelylarge databases presents special problems.

In recent years, a unique distributed database has emerged in the formof the World-Wide-Web (Web). The database records of the Web are in theform of pages accessible via the Internet. Here, tens of millions ofpages are accessible by anyone having a communications link to theInternet.

The pages are dispersed over millions of different computer systems allover the world. Users of the Internet constantly desire to locatespecific pages containing information of interest. The pages can beexpressed in any number of different character sets such as English,French, German, Spanish, Cyrillic, Kanakata, and Mandarin. In addition,the pages can include specialized components, such as embedded "forms,"executable programs, JAVA applets, and hypertext.

Moreover, the pages can be constructed using various formattingconventions, for example, ASCII text, Postscript files, html files, andAcrobat files. The pages can include links to multimedia informationcontent other than text, such as audio, graphics, and moving pictures.As a complexity, the Web can be characterized as an unpredictable randomupdate, insert, and delete database with a constantly changingmorphology.

Prior art search engines are ill equipped to handle the formidable taskof indexing the Web. Most database access tools are designed to becontext dependent. Extant indexing systems such as Lexis/Nexis, Dialog,and EXCITE, index a limited number of pages either by choice orlimitations in their browsing or indexing capabilities. Attempts toreduce the size of their indices have been made by excluding commonlyoccurring English words such as "a," "the," "of," and "in."

Other search engines only index abstracts of the Web pages, such astheir titles, authors, and locations, and not the full content of thepages. These are severe limitations, particularly in an environmentwhich permits the creation of pages in other linguistic and grammaticalconstructs.

It is an additional problem to present the search results in a usablemanner, particularly if a search request can locate thousands ofqualifying records. It is a burden to require the user to peruse allqualifying records.

It is also a problem to conduct a search in a timely fashion. In acommercial environment, users may be charged for connect time.Therefore, it is important that the searches be performed in a matter ofseconds. As an additional problem, new records appear by the thousands,and incrementally updating an index is difficult, particularly if theindex needs to be continuously accessible for searching.

Most conventional full text indices are commonly arranged as one or moresorted lists of unique valued words, and pointers to lists of locationswhere the words occur in the database. Typically, the lists of locationsare maintained separately. This approach requires at least one level ofindirection to access a word/location pair. In addition, this type ofdata structure implies that the words and their locations, together, arenot ordered sequentially, but hierarchically.

It is also a problem to minimize the amount of physical media, e.g.,memories, required to store the index. For example, in the prior artattempts are made to keep all of the first level pointers in dynamicrandom access memories (DRAM) which has relatively fast accesslatencies. The lists of pointers are typically maintained on slower diskstorage. For these reasons, most large scale indices use a hierarchicalarchitecture, such as multi-way trees or tries, while scanning theindexed entries.

Simplistically, the word/location pairs can be considered a largetwo-dimensional array, with the words along one axis, and the locationof the words along the other axis.

This makes it relatively inexpensive to provide access to any of thewords, since most words can be cached in DRAM. However, determining thelocations associated with the selected words will typically require arelatively large number of expensive disk operations, reducing thethroughput efficiencies of the index.

Also, most prior art full text indices inefficiently deal with indexingcontext-dependent attributes about the information being indexed. Somesystems may maintain separate indices to store general information aboutdata or records indexed. This approach increases the cost of searchingthe indices with queries having terms which combine words, and generaldescriptions about documents or part of documents, such as titles.

Furthermore, in conventional indices, ad hoc data structures aretypically provided to allow updating, e.g., the addition and deletion ofentries, concurrent with searching. For example, a journal or"stop-press" file may store new entries. The design and support ofdifferent data structures, and processes which operate thereon, degradesperformance. Periodically, when the typically inefficient journal filebecomes too large, it must be merged with the primary index, perhapsexcluding the searching of the index during the update processes.

If the database from which the index is to be created is large, thedocuments to be processed are usually divided into several parts. Theseveral parts are indexed separately, and when all parts have beenindexed, the indexed parts are processed by a sort/merge operation. In alexicon based partitioning approach, during a first pass of thedatabase, only words having values in a predetermined range are indexed,for example, only the words beginning with the letters A through D, thenduring subsequent passes the rest of the words are processed. This typeof approach is not well suited for a database such as the Web.

Therefore, it is desired to provide a search engine which can indexlarge databases storing content in a number of different forms. The datastructure of the index should be compact in order to reduce the cost ofthe search engine. In addition, the processes which operate on the datastructure should be efficient so that search results can be presented ina reasonable amount of time and a meaningful manner.

SUMMARY OF THE INVENTION

A system indexes Web pages of the Internet. The pages are stored incomputers distributively connected to each other by a communicationsnetwork. Each page has a unique URL (universal record locator). Some ofthe pages can include URL links to other pages.

A communication interface connected to the Internet is used for fetchinga batch of Web pages from the computers in accordance with the URLs andURL links. The URLs are determined by an automated Web browser connectedto the communications interface.

A parser sequentially partitions the batch of specified pages intoindexable words where each word represents an indexable portion ofinformation of a specific page, or the word represents an attribute ofone or more portions of the specific page. The parser sequentiallyassigns locations to the words as they are parsed. The locationsindicate the unique occurrences of the word in the Web.

The output of the parser is stored in a memory as an index. The indexincludes one index entry for each unique word. Each index entry alsoincludes one or more location entries indicating where the unique wordoccurs in the Web.

A query module parses a query into terms and operators. The operatorsrelate the terms. A search engine uses object-oriented stream readers tosequentially read the locations of specified index entries, thespecified index entries correspond to the terms of a query.

A display module presents qualified pages located by the search engineto users of the Web.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a distributed database storing multimediainformation indexed and searched according to the invention;

FIG. 2 is a block diagram of a search engine including an index;

FIG. 3 is a block diagram of pages parsed by the search engine of FIG.2;

FIG. 4 is a block diagram of content attributes generated by the searchengine;

FIG. 5 is a sequential representation of the content and attributes ofthe pages of FIG. 3;

FIG. 6 is a block diagram of sequential words and their locations;

FIG. 7 is a block diagram of a compression of words;

FIG. 8 is a block diagram of a compression of locations;

FIG. 9 is a logical to physical mapping of the index;

FIG. 10 is a block diagram of an array of files used to arrange theindex;

FIG. 11 is a block diagram of a remapping table used while deletingentries;

FIG. 12 is a tree representation of a query processed by the searchengine;

FIG. 13 is a block diagram of an index stream reader object;

FIG. 14 is a flow diagram of a query search using the logical ORoperator;

FIG. 15 is a linear representation of a page to be searched using thelogical AND operator;

FIG. 16 is a flow diagram of basic index stream reader objects linked toeach other by a compound stream reader which is subject to constraints;

FIG. 17 is a flow diagram of a query search using the logical ANDoperator;

FIG. 18 is a linear representation of adjacent words;

FIG. 19 is a block diagram of range-based metaword values;

FIG. 20 is a table for storing word weights;

FIG. 21 is a block diagram of query word lists;

FIG. 22 is a block diagram of a page ranking list;

FIG. 23 is a block diagram of a query phrase log;

FIG. 24 shows a process for detecting duplicate pages;

FIG. 25 is a flow diagram of a process for deleting pages; and

FIG. 26 is a flow diagram of a process for indexing reissue pages.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS Introduction

FIG. 1 shows a distributed computer system 100 including a database tobe indexed. The distributed system 100 includes client computers 110connected to server computers (sites) 120 via a network 130. The network130 can use Internet communications protocols (IP) to allow the clients110 to communicate with the servers 120.

The client computers 110 can be PCs, workstations, or larger or smallercomputer systems. Each client 110 typically includes one or moreprocessors, memories, and input/output devices. The servers 120 can besimilarly configured. However, in many instances server sites 120include many computers, perhaps connected by a separate private network.In fact, the network 130 may include hundreds of thousands of individualnetworks of computers.

Although the client computers 110 are shown separate from the servercomputers 120, it should be understood that a single computer canperform the client and server roles.

During operation of the distributed system 100, users of the clients 110desire to access information records 122 stored by the servers 120using, for example, the World-Wide-Web (WWW), or in short the "Web." Therecords of information 122 can be in the form of Web pages 200. Thepages 200 can be data records including as content plain textualinformation, or more complex digitally encoded multimedia content, suchas software programs, graphics, audio signals, videos, and so forth.

It should be understood that although this description focusses onlocating information on the World-Wide-Web, the system can also be usedfor locating and indexing information via other wide or local areanetworks (WANs and LANs), or information stored in a single computerusing other communications protocols.

The clients 110 can execute Web browser programs 112, such as NAVIGATOR,EXPLORER or MOSAIC to locate the pages or records 200. The browserprograms 112 allow the users to enter addresses of specific Web pages200 to be retrieved. Typically, the address of a Web page is specifiedas a Universal Resource Locator (URL). In addition, once a page has beenretrieved, the browser programs 112 can provide access to other pages orrecords by "clicking" on hyperlinks to previously retrieved Web pages.Such hyperlinks provide an automated way to enter the URL of anotherpage, and to retrieve that page.

In order to identify pages of interest among the millions of pages whichare available on the Web, a search engine 140 is provided. The searchengine 140 includes means for parsing the pages, means for indexing theparsed pages, means for searching the index, and means for presentinginformation about the pages 200 located.

The search engine 140 can be configured as one or more clusters ofsymmetric multi-processors (P) 142, for example, Digital EquipmentCorporation ALPHA processors, memories (M) 144, disk storage devices146, and network interfaces 148 that are connected to each other by highspeed communications buses 143. Although, the ALPHA processors 142 are64 bit RISC processors, the search engine 140 can be any type ofprocessor which has sufficient processing power and memories, including32 bit CISC processors. For smaller databases, the search engine can berun on the computer storing the database.

Search Engine Overview

FIG. 2 shows the components of the search engine 140. The search engine140 can include an automated Web browser 20, a parsing module 30, anindexing module 40, a query module 50, index stream readers (ISR) 60, anindex 70, and a maintenance module 80.

Browsing

During the operation of the search engine 140, the automated browser 20,sometimes known as a "robot," periodically sends out requests 21 overthe network 130. The requests 21 include URLs. In response to therequests 21, the sites 120 return the records or pages 200 to thebrowser 20. The browser 20 can locate pages by following hyperlinksembedded in previously acquired pages. The browser 20 is described morecompletely in U.S. patent application Ser. No. 08/571,748 filed by LouisM. Monier on Dec. 13, 1995 entitled "System and Method for LocatingPages on the World-Wide-Web."

Parsing

The pages 200 can be presented to the parsing module 30 as they arereceived or in batches which may amount to ten thousand pages or more,at one time. The parsing module 30 breaks down the portions ofinformation of the pages 200 into fundamental indexable elements oratomic pairs 400. As described in greater detail below, each pair 400comprises a word and its location. The word is a literal representationof the parsed portion of information, the location is a numeric value.The pages are parsed in order of the location of the words such that alocation of the first word of a next page follows a location of the lastword of a previous page. The parsing module 30 assigns increasinginteger numbers to the locations, although other sequential orderingsare also possible.

Indexing

The indexing module 40 sorts the pairs 400, first in word order, andsecond in location order. The sorted pairs 400 are used to generate theindex 70 of the words of the pages 200. The index 70 is described ingreater detail below. Abstractly, the index 70 can be pictured ascomprising compressed data structure 71, and summary data structures72-73. The compressed data structure 71 is a compression of the wordlocation pairs 400. The data structure 72 is a summary of the structure71, and the data structure 73 is a summary of data structure 72. Thestructures 71 and 72 can be stored on disk, and the structure 73 can bestored in DRAM.

In the data structure 71, each word representing a unique portion ofinformation of the pages 200 is stored only once. All of the locationswhich are instances of the word in the pages 200 are stored followingthe word. The locations follow the word in order according to theirlocations. The locations essentially are pointers to the parsed portionsof information.

It should be understood that the number of different unique words can bewell over one hundred million, since any combination of characters canform words of the pages 200. Also, many frequently occurring words, suchas the words "the," "of," "a," etc., may appear at hundreds of millionsof different locations. The extremely large size of the index 70, andits increasing size present special processing problems.

As described below, the data structures of the index 70 are optimizedfor query access. This means that the word-location pairs 400 arecompressed to reduce storage, and uncompressing is minimized in order topreserve processor cycles during searching. Furthermore, the datastructures of the index 70 also allow concurrent maintenance of theindex 70 to delete old entries and to add new entries while queries areprocessed.

Querying

Users interact with the index 70 via the query module 50 by providingqueries 52. Users can be located remotely or locally with respect to thesearch engine 140. The terms of a query can include words and phrases,e.g., multiple words enclosed in quotation marks ("). The terms can berelated by Boolean operators such as OR, AND, and NOT to formexpressions. The queries 52, as described in greater detail below, mayalso include terms which express ranges of values, or approximatelocations of words to each other.

During operation, the query module 50 analyzes the queries 52 togenerate query requests 54. The query requests invoke a small number ofbasic types of object-oriented index stream readers (ISRs) 60, describedbelow. The index stream readers 60 sequentially scan the data structures71-73 in a manner to minimize the amount of data that need to beuncompressed.

As a result of searching the index 70 by the stream reader objects 60,addresses 56 of pages which are qualified by the queries are identified.A presentation module 58 delivers information 59 about the qualifyingpages to the users. The information 59 can include a summary of thepages located. Using the summary information, the users can access theidentified pages with Web browsing software, or other techniques.

Maintaining

As described below, the maintenance module 80 is used to add and deleteinformation of the index 70. Modified pages can be handled as a deleteand add operation. A particular problem solved is to allow substantiallycontinuous access to the index 70 by millions of users each day as theindex 70 is concurrently updated. The maintenance module 80 alsoeffectively deals with duplicate Web pages containing substantiallyidentical content.

The components of the search engine 140 are now described in greaterdetail.

The Parsing Module

Words

As shown in FIG. 3, the records or pages 200 are parsed by the parsingmodule 30 in the order that pages are received from the browser 20. Theparsing module 30, in a collating order of the sequential locations ofthe content, breaks the information of the pages 200 down into discreteindexable elements or individual "words" 300. Each word 300 is separatedfrom adjacent words by a word separator 210 indicated by a circle. Inthe index 70 each word is stored as a "literal" or character basedvalue. It should be understood, that the terms page 200, word 300, andseparator 210 are used to represent many different possible contentmodalities and data record specifications.

Pages

A page 200 can be defined as a data record including a collection ofportions of information or "words" having a common database address,e.g., a URL. This means that a page can effectively be a data record ofany size, from a single word, to many words, e.g., a large document, adata file, a book, a program, or a sequence of images.

In addition, the digitized information which is stored by the records orpages 200 can represent a number of different presentation modalities.The page 200 can be expressed using the ASCII, or other character setssuch as iconic, scientific, mathematical, musical, Hebrew, Cyrillic,Greek, Japanese.

On the Web, it has become common to represent information using a HyperText Markup Language (html). In this case, the pages can include other"marks" which indicate how the "words" of the page are to be processedand presented. Pages can include programs, for example JAVA applets,which may require specialized parsing. The information of some pages canbe expressed in a programming language, for example, Postscript (.ps),or Acrobat (.pdf) files. The pages 200 can encode multimedia itemsincluding digitized graphic, audio or video components.

The pages or data records 200 do not necessarily need to be Web pages.For example, the pages can be composed of portions of information ofother databases, for example, all of the case law in the United States.Even if such pages do contain hyperlinks, they may contain other typesof links. In this context, the links mean references in one documentwhich can be used to find other documents. Although hyperlinks are oneexample, many other types of links may be processed.

For example, in court cases, the "links" are citations to other cases.The "pages" can be the patents of the United States Patent and TrademarkOffice. Now the "links" can be the prior art references cited.

Additionally, the pages 200 can be electronic mail memos stored in PCs.For "audio" pages, the words may be composed of encoded phonemes. In anycase, no matter what the modality of the underlying information, thewords are always represented in the index as literals.

Word Separators

Textual words are a concatenation of numbers and characters, for example"the", and "ωombαT23." In one possible parsing technique, charactersother than numbers or letters are considered word separators 210. Forexample, blanks and characters such as "@#.<?˜,%" are word separators.Word separators 210 are not indexed.

It should be understood that the parsing module 30 can be provided witha first list of literal characters or marks which can form words, and asecond list of marks, or other criteria, e.g., white space, which are tobe considered as separators 210. Separate lists can be maintained in thesearch engine 140 for different types of pages.

In the cases where a programming language such as Postscript or Acrobatis used to represent information to be indexed, the parsing module 30can detect word separation by the language instructions which areresponsible for generating discrete words.

The parsing of the pages into words and locations can be contextindependent or context dependent. For example, if a page 200 is known tobe expressed in a script where the location of words is in anothercollating order, for example, from right to left, or top to bottom, theparsing can proceed accordingly.

Word and Location Pairs

In summary, each page 200 is broken down into a sequence of pairs 400according to the collating order of the locations of the words 300. Eachpair 400 stores the word 410 and its location 420. The locations of thewords indicate the relative order in which the parsing module identifiedthe words 300 in the pages 200.

Each page has a first word and a last word. For example in FIG. 3, thefirst word 201 of the very first page which is parsed has an associatedlocation "1" 211, the next word 202 has a location "2" 212, the lastword 203 has a location "306" 213. This means the first page hasthree-hundred and six indexable words.

The first word 204 of the second page has an associated location of"307" 214. The last word 205 of the second page has a location "500"215. This means that second page includes 194 (500-306) words. From theperspective of the parsing module 30, the first word of a next page isconsidered to be positionally adjacent to the last word of a previouspage. The last word 209 of the very last page that is parsed has, forexample, a location "473458219876" 216.

The word 410 determines the value of the "content" at a particularlocation. As stated above, content can be represented in a variety ofdifferent modalities. For example, the word "a" may be expressed as abinary encoding of the ASCII value of "a." In one implementation, thelocations 420 incrementally increase by one for each word parsed. Othersequential numbering schemes for locations can also be used.

Synonyms

Besides explicitly producing the pair [word, location] for eachrecognized word, the parser can also implicitly produce one or moresynonymous pairs for expressly identified words. For example, if theidentified word 201 on the first page is "To", in addition to producingthe pair [1,To], the parsing module 30 can also produce, for the samelocation, the pair [1, to]. That is, the parsing module 30 produces twopairs for the same location. This step is useful to subsequently allowcase insensitive searches by the query module 50. The parsing module 30can also select synonyms from lists maintained in language translationdictionaries.

Punctuation

If the parsing module 30 admits non-alphanumeric characters in words,additional pairs may be produced for single locations. For example, theparsing module 30 can be directed to treat punctuation immediatelyadjacent to letters or numbers as part of the word. For example, if thesecond word 202 is a concatenation of the characters "5,234,236","023-45-3678" or "Ph.D", the characters could very well be considered toform single words.

In the case of the value "Ph.D," the parsing module 30 can produce thepairs [2, Ph], [2,.] [3, D], and [2,ph], [2,.], [3,d] to facilitatesearches where the input query is any sequence of characterssubstantially similar to the explicitly expressed words. This allowsquery phrases that are specified with both precise and imprecisepunctuation marks.

Accents

Furthermore, the parsing module 30 can implicitly produce additionalpairs for words which include accented characters. For example the word"Ecu" can also be indexed as values "ecu," "Ecu." and "ecu," all at thesame location. This allows for the searching of pages expressed incharacters of one alphabet using characters of another alphabet notnecessarily including the accented characters. Thus for example, a userwith an "American" style keyboard can search foreign language pages.

Proper Names

The parsing module can also locate words which are likely to be related,such as proper names, e.g., James Joyce. If two adjacent words bothbegin with an upper case letter, in addition to producing a pair for thefirst name and the last name, a pair can also be produced which is aconcatenation of the first and last names. This will speed up processingof queries which include proper names as terms.

Attributes and Metawords

As shown in FIG. 4, in addition to recognizing locations and words, theparsing module 30 also detects and encodes attributes about the contentof the records or pages. Attributes can be associated with entire pages,portions of pages 230, 240, 250, 270, and 260, e.g., fields, orindividual words 203.

Attribute values, as defined herein, are expressed as "metawords."Metawords are also stored as literals, this means that the search engine140 treats metawords the same as words. Therefore, a metaword isassociated with a location to form a pair [metaword, location]. For arecord attribute, which relates to an entire record, the location of thelast word of the page is associated with the attribute. For fieldattributes which relate to a portions of the record, the first and lastword of the fields are associated with the attributes.

For example, the page 200 of FIG. 4 can have associated page attributes250. Page attributes 250 can include □ADDRESS□ 251, □DESCRIPTION□ 252,□SIZE□ 253, □DATE□ 254, □FINGERPRINT□ 255, □TYPE□ 256, and □END₋₋ PAGE□257, for example. The symbol "□," represents one or more characterswhich cannot be confused with the characters normally found in words,for example "space," "underscore," and "space" (sp₋₋ sp).

The ADDRESS 251 encodes, for an exemplary Web page, the URL. TheDESCRIPTION 252 may be the first two or three lines of the page. Thisinformation can help a user identify a page that would be of interest.

The SIZE 253 can be expressed as the number of bytes of a page. The sizeinformation can help a user determine the amount of bandwidth needed to"download" the page, and the amount of memory needed to store the page.The DATE 254 can be the date that the page was generated, or lastmodified. In the case of multiple versions of extant pages, the mostrecent page may be more significant to users. The SIZE and DATEattributes can be searched using range-based values.

For example, a search can request to locate information of pages with acertain size or date range. Therefore, these attributes are stored in aspecialized (power-of-two) manner as multiple attributes, described ingreater detail below.

The FINGERPRINT 255 represents the entire content of the page. Thefingerprint 255 can be produced by applying one-way polynomial functionsto the digitized content. Typically, the fingerprint is expressed as aninteger value. Fingerprinting techniques ensure that duplicate pageshaving identical content have identical fingerprints. With very highprobabilities, pages containing different content will have differentfingerprints.

The TYPE attribute 256 may distinguish pages having different multimediacontent or formatting characteristics.

Other types of page related attributes which have been determined to beuseful are □BEGIN₋₋ BIG□ 261, and □END₋₋ BIG□ 262. Here, "BIG" meansthat the number of words of the page exceeds some predeterminedthreshold value, e.g. 16K. By making the □BEGIN₋₋ BIG□ and □END₋₋ BIG□attribute values a searchable metaword, traversal of the index 70 can beaccelerated if the number of words in most pages is less than thethreshold value, as explained in greater detail below. The locations ofthese two attributes are respectively associated with the first and lastwords of big pages.

End Page

For each page, the parsing module also synthesizes an □END₋₋ PAGE□attribute 257. The □END₋₋ PAGE□ attribute 257 is used extensively by theindex stream readers 60 of FIG. 2 to converge on pages containing wordsor phrases specified in the queries 52. This is due to the fact that theultimate selection criteria for qualifying content information is pagespecific. By inserting the □END₋₋ PAGE□ attribute value in the index 70as a metaword, searching the index as described below can be moreefficient.

The locations associated with attributes may be locations of the wordsexpressing the content to which the attributes apply. For example, ifthe last word 203 of the page 200 of FIG. 4 has a location 306, as shownin FIG. 3, then in addition to producing the pair [306, word], theparsing module 30 also produces the attribute pair [306, □END₋₋ PAGE□].This means locations associated with this metaword clearly define pageboundaries. Alternatively, the attributes can have the first and lastlocations of the set of words (field) associated with the attributes.

Explicit Page Breaks

During parsing, it is possible to allocate one or more locations betweenthe pages as the locations where attributes are stored. For example, oneor more locations could be set aside between the last location of aprevious page and the first location of a next page for indicating pagerelated attribute values.

Title

Attribute values or metawords can be generated for portions of a page.For example, the words of the field 230 may be the "title" of the page200. In this case the "title" has a first word 231 and a last word 239.In "html" pages, the titles can be expressly noted. In other types oftext, the tide may be deduced from the relative placement of the wordson the page, for example, first line centered. For titles, the parsingmodule 30 can generate a □BEGIN₋₋ TITLE□ pair and an □END₋₋ TITLE□ pairto be respectively associated with the locations of the first and lastwords of the title.

Cite

The field 240 can be identified by the parsing module 30 as a citationfield expressed, for example in italic, underlined, or quotedcharacters. In this case, the parsing module can generate □BEGIN₋₋ CITE□and □END₋₋ CITE□ metawords to directly index the citation.

Tables

The field 270 can have table attributes. In this case, the vertical andhorizontal arrangement of the words may determine the collating order oftheir locations.

Graphics

The field 260 may be identified as a graphic symbol. In this case, theattribute values or metawords can encode, for example, □BEGIN₋₋ GRAPHIC,and □END₋₋ GRAPHIC□.

Other Attributes

Attributes can also be associated with individual words, for example, aword may have an □AUTHOR□ attribute, a □LINK□, or an □AUDIO□ attribute,and so forth. Other indexable attributes can include image tags, e.g.,"comet.jpg," host (site) names, e.g., "digital.com," or Web newsgroup,"rec.humor," or user specified attributes.

The Productions of the Parsing Module

FIG. 5 abstractly shows a view of the words and metawords of the pages200 as produced by the parsing module 30. The parsing module 30 producesa sequence of pairs 500 in a collating order according to the locationsof the words 300 of the various pages 200. Some of the words may alsocause the parsing module 30 to generate synonymous words (S) 510 for thesame location. Metawords (M) 520 are generated to describe page, field,or word related attributes.

The Indexing Module

As stated above, the indexing module 40 generates an index 70 of thecontent of the records or pages 200. The internal data structures 71-73of the index 70 are now described first with reference to FIG. 6.

It should be noted, that in the following description, the term "word"is used to include both words and metawords as defined above, unlessexpressly noted otherwise. Making words and metawords substantiallyindistinguishable as literals greatly improves the efficiencies of thedata structures and processing steps of the search engine 140.

In order to prepare the pairs 400 to be indexed, the pairs are sortedfirst in word order, and second in location order.

Sequential Fully Populated Word and Location Entries

In the compressed data structure 71, as shown in FIG. 6, a word entry700 of a first index entry 600, e.g., the literal "abc," is followed bythe locations 800 where the word 700 occurs. The word 700 is stored asone or more 8-bit bytes. The bytes which comprise the word are followedby a terminating byte 701 having a zero value.

Each location entry 800 is expressed as one or more bytes. The lastlocation entry for a particular word includes a zero byte 801 as aterminator. In the data structure 71, the last location of a word isimmediately followed by the next index entry including the word entry702, e.g., the literal "abcxy," and its locations.

In an index of the Web, the word "the" might appear at hundreds ofmillions of different locations. Therefore, in the index 70, the entryfor the word "the" is followed by millions of location entries.Altogether, the search engine 140 may include hundreds of millions ofdifferent word entries. In addition, as the number of pages of the Webincrease, so does the size of the index 70.

Therefore, the search engine 140 uses a number of different compressingtechniques to decrease the amount of storage required for the index. Inaddition, summarizing techniques are used to reduce the processingrequirements while searching the compressed data of the index.

Compressing Word Entries

FIG. 7 shows a prefix compressing technique which can be used to mapfrom words 710 to compressed words 720. Recall that the index maintainsthe words in a collating order of their values. If the first possibleindexed word 711 has a value "a," then the compressing yields one ormore bytes 712 representing the value of the character "a", followed bya zero byte 713.

The next indexed word 714, e.g., "aa" may have some prefix characters incommon with the preceding word. In this case, the compressing indicatesthe number of common prefix characters 715, e.g., "1" followed by thedifferent postfix characters 716, followed by the terminating zero byte717, and so forth. For example, the word "abcxy" 719 has three prefixcharacters in common with the previously encoded word "abc" 718 and thedifferent characters are "xy." If a word has no prefix characters incommon with a preceding word, then the word is encoded as a first word.

Compressing Location Entries

FIG. 8 shows a delta value compressing technique which can be applied tothe locations 800 of FIG. 6. The technique takes advantage of the factthat frequently occurring words such as "the," "of", "in," etc., arelocated close to each other. Therefore, compressing the locationsminimizes the number of bytes consumed to express the numerous locationsof common words which appear close to each other.

Each location of a word is expressed by a delta value (DV). The deltavalue means that the location is expressed as a relative offset inlocations from a previous location. The first location for a particularword can be the offset from location "0." For example, if a firstoccurrence of the word "the" is at location "100", and next occurrencesare at locations "130" and "135," the delta values are respectivelyexpressed as 100, 30, and 5.

If the delta value is in the range of 0<DV<128, the DV is encoded as asingle byte 810 with the low order (left-most) bit 811 set to zero, seeFIG. 8. The remaining seven bits express the DV. If the DV is in therange 127<DV<16K-1, the DV encoding consists of a first byte 820 withthe low order bit 821 set to a logical one to indicate that acontinuation byte 830 follows. The continuation byte 830 has the highorder bit 831 set to a logical zero signalling the end of the deltavalue encoding.

For delta values 16K or greater, the first byte 841 has the low orderbit set to a one, the other bytes 842 have the high order bit set to aone, and the last byte 843 has the high order bit set to zero toindicate the end of the delta encoding for a particular location.

The compressing technique is optimized for delta values in the range of1 to 16K-1, since the majority of delta values are expected to fallwithin this range. Thus, delta values in this range can be uncompressedby shifting the content of two bytes by one. Because the high order bitof the second byte is zero, no further processing, like bit clearing, isrequired to extract the delta value.

Scanning the Word and Location Entries

Delta value compressing as described herein allows the index streamreaders 60 of FIG. 2 to "scan" the index at a great rate whileuncompressing and trying to reach a target location. The most frequentlyoccurring delta values, e.g., one and two byte delta values, onlyrequire six machine executable instructions to recover and evaluate anext location. With dual-issue processors, the index stream readers 60,which do the bulk of the work in the search engine 140, can process anext location in three machine cycles. This may mean, for a 300+ MHzprocessor, that the stream readers could process a stream of deltavalues at a rate of approximately 100,000,000 locations per second.

It should be understood, that other types of loss-less compressingtechniques can be used to reduce the amount of storage for the word andlocation entries in the compressed data structure 71 of FIG. 2. Inaddition to compressing with software procedures, the compressing couldalso be performed by hardware means, using for example, Huffman orLempel-Ziv codings.

The Logical and Physical Data Structure of the Index

FIG. 9 shows the data structures 71-73 of the index 70 of FIG. 2 ingreater detail. The data structure 71 maps the compressed entries (wordsand locations) onto a physical media of the search engine 140, e.g., thememories 144 and disk 146 of FIG. 1. Logically, the compressed datastructure 71 sequentially stores the words (and metawords) having unique(binary encoded) values in a collating order according to their values.There is a lowest valued word 906 and a highest valued word 907. Eachword is immediately followed by the set of locations (locs) 908 wherethe word appears in the numerous pages. The locations are stored in anincreasing positional order.

Physically, the word and location entries of the compressed datastructure 71 are stored in fixed size blocks 910 of disk files. Theblocks 910 can be 2KB, 4KB, 8KB, 16KB, or any other size convenient forphysical I/O and memory mapping. The physical media includes the disk146 for persistent storage, and the memories 144 for volatile storagewhile the search engine 140 is operational.

Word and location entries are allowed to straddle block boundaries tofully populate the compressed data structure 71. Creating the blocks 910for an exhaustive search of the Web may take several days of continuousprocessing of batches of pages 200.

Summaries of the Compressed Data Structure

As the first level compressed data structure 71 is being generated, thesecond level summary data structure 72 can also generated. The summarydata structure 72 is generated using a sampling technique. The techniqueperiodically "samples" the location entries 800 being placed in thecompressed data structure 71. For example, a sample is taken wheneverabout a hundred bytes have been written to the compressed data structure71. Since the average size of the location entries is approximately twobytes, a sample is taken about every fifty entries.

It should be understood that the compressed data structure 71 can besampled at higher or lower byte rates. Sampling at a higher rateimproves the granularity of the summary, but increases its size, andsampling at a lower rate decreases granularity and storage.

The samples are used to generate summary entries 925 in the second levelsummary data structure 72. Each summary entry 925 includes the word 926associated with the sample, and the sampled location 927 associated withthe word. In addition, the summary entry 925 includes a pointer 928 ofthe next entry in the compressed data structure 71 following the sampledentry. The summary data structure 72 can also be mapped into fixed sizeblocks or disk files to fully populate the summary data structure 72.

If the summary entries 925 store uncompressed words and locations, thesummary data structure 72 can be searched in a non-sequential manner.For example, a binary search technique can be used on the summary datastructure 72 to rapidly locate a starting point for a more fine grainedsequential search of the compressed data structure 71. If some of thesummary entries 925 are compressed, storage space can be reduced, whileallowing modified binary searches.

For example, during operation of the search engine 140, as explained ingreater detail below, the summary data structure 72 can first besearched to find a summary entry 925 having a location 927 closest to,but not greater than a target location. The pointer 928 of that summaryentry can then be used as a starting address to begin scanning thecompressed data structure 71. The location 927 of the summary entry canbe the base for adding the delta value of the next entry of thecompressed data structure 71 referenced by the address of the summaryentry.

In the event that the size of the summary data structure 72 becomes toolarge to store entirely in the dynamic memories 144, the third levelsummary data structure 73 can dynamically be generated. For example, thesummary data structure 72 can be scanned while periodically takingsamples to generate the summary entries of the data structure 73. Thesummary data structure 73 can be sampled at a rate which is the same ordifferent than the sampling rate used to build the summary datastructure 72. The summary entries 925 of the third level summary datastructure 73 are similar in construction to the entries of the secondlevel. The top level summary data structure can be sized to fit entirelyin the memories 144.

As an advantage of these structures 71-73, a very large index can besearched using a minimal number of time-consuming disk I/O operations.If all of the top level summary data structure 73 is stored in dynamicmemories 144, and the sampling rates are relatively high, e.g., onesample every hundred bytes, then at most two disk accesses are requiredto begin the sequential reading of location delta values of thecompressed structure 71.

The Maintenance Module

The index 70 is optimized for searching, hence the parsimoniouscompressing and summary entries. Keeping such a large index currentpresents special problems because this type of structure may be lesssuitable for conventional maintenance operation. For example, it mayperiodically be necessary to admit modified or new entries, and toexpunge deleted entries.

Deleting a single page may require the reordering of millions oflocation values of the data structures of the index 70 of FIG. 9 becauseof "holes" left by deleted words and location entries. For any pagewhich is deleted, all of the locations of the following pages need to beadjusted, byte by byte. For example, if a deleted page includes 888words, the locations of the following pages need to be reduced by 888.

Adding a page presents additional complexities. For words which alreadyhave entries in the index, new locations need to be added. New uniquewords and their locations in the added pages need to be inserted in theindex structure in their correct collating order.

A Two-Dimensional Array of Files to Store the Index

As shown in FIG. 10, the index 70 is organized as a two-dimensionalarray 1000 of data structures 1001 to allow concurrent searching andmaintaining of the index 70. By having multiple data structures 1001,the index 70 can be updated incrementally on a per data structure basis.The array 1000 includes a plurality of tiers 1010-1014 and a pluralityof buckets 1020-1039, e.g., respectively columns and rows. Thedimensionality of the array 1000 is described below.

Each data structure 1001 includes, for example, two disk files. One file71' to store a portion of the compressed data structure 71, and a secondfile 72' for storing the corresponding summary data structures 72. Thethird data structure 73 is typically stored in the memories 144.

By partitioning the index 70 over the multiple data structures 1001, theupdating problems stated above are minimized since the size of the filesconcurrently being modified is greatly reduced. Multiple files allowsmall changes to be made to the index 70 without incurring too muchadditional maintenance overhead.

Buckets

The words (and their associated locations) are allocated to the buckets1020-1039 according to a hash encoding (binary encoded value) of thewords. For example, the hashing can disperse the words (and theirlocations) over twenty buckets 1020-1039. The sequential ordering of thewords within a particular bucket is maintained. The hashing merelyserves to evenly distribute the words (and their locations) over thebuckets.

By keeping the number of buckets relatively small, e.g., approximatelytwenty, frequently occurring words do not unnecessarily overload any onebucket. For example, the bulk of the Web pages are expressed in theEnglish language. In English text, the word "the" normally appears aboutevery fiftieth word. If the number of buckets was made to be larger thanabout fifty, one of the buckets would likely contain a disproportionatenumber of location entries, e.g., the locations of the word "the."

Tiers

The tiers 1010-1014 are produced as follows. Recall that the parsing ofthe pages 200 can proceed in batches. Each batch is encoded as one ofthe tiers. During parsing and indexing, a first batch of pages wouldproduce the first tier 1010, a next batch the next tier, etc., a fifthbatch would produce the tier 1014. The number of tiers extant at any onetime is dependent on how frequently merging takes place, see below.

As additional tiers are generated, the subsequent tiers of a particularbucket essentially become extensions of previous tiers of the samebucket. That is, the locations of words in later generated tiers of aparticular bucket follow the locations of words in earlier generatedtiers of the same bucket.

Merging Tiers

The search engine 140 is designed to reduce the number of tiers. Thisproduces optimum performance, since switching from one tier to anotherwhile searching the index requires higher level and more time consumingsystem services.

Therefore, the maintenance module 80 periodically merges a followingtier with a previously generated tier. While merging tiers, thecollating order of the word and location entries is preserved. In orderto maximize the efficiency during a merge/sort, subsequent tiers aremerged into a previous tier only if the amount of data in a subsequent(later) tier is at least as much as the data stored in the previous tierof the same bucket.

If the number of bytes in the index is N, then the time to update is Nlog N bound, as opposed to N² bound should a single data structure beused. This makes the updating of an extremely large index that isoptimized for searching tractable.

Deleting Entries

During merge/sort, deleted entries of the index are expunged. Thedeleting of entries proceeds as follows. Remember, all words andmetawords and their locations are sequentially indexed. Therefore,deleting a page can affect a large portion of the index 70.

Deleted pages can be detected by the automated browser 20 of FIG. 1. Forexample, the browser 20 periodically searches the Web to determine if apreviously indexed page is still active. If the page is gone, thebrowser 20 can inform the maintenance module 80. Deleted pages can benoted in the index by attaching a "deleted" attribute to the page. Thedeleted attribute can have a special attribute value, for example,□DELETED□. The location associated with the deleted attribute can be thesame as the location of the last word of the page to be deleted.

Once a page has a deleted status, words associated with the page areignored during searching. Deleted pages can be identified by modifyingthe queries, described below, to check if a page has an associated□DELETED□ attribute.

During merge/sort, index entries of a subsequent one tier are mergedwith those of a previous tier of the same bucket. The union of themerged index entries are placed in a new tier having "new" locations.Deleted word or location entries are expunged.

Note, the manner in which the tiers were generated guaranties that thelocations stored in a subsequent tier are an extension of the locationsstored in the previous tier. In order to make the index available duringmerging, a location remapping table is used to map locations of the newspace into equivalent locations expressed in the old space.

Remapping Table

As shown in FIG. 11, the remapping table 1100 for the entire index 70includes a first column 1110 of locations 1111-1119 which reflect the"new" or merged portion of the index, and a second column 1120 of "old"locations 1121-1129. For the example mapping shown, the first entries1111 and 1121 indicate that location "9" in the old space, is equivalentto location "7" in the new merged space, e.g., locations "7" and "8" inthe old space are deleted.

During a merge/sort of the tiers of the various buckets, some of thedata structures 1001 will be processed before others. This means thatsome files of the data structures 1001 will have their locationsexpressed in "new" space, and other files will still be expressed in"old" space. Therefore, associated with each data structure 1001 is an"old/new" indication.

The query module 50 treats all words as being defined in terms oflocations of the old space, until all of the buckets have been convertedto the new space. Therefore, while the index stream readers 60 of FIG. 2are scanning the index 70, locations of words found in the "new" spaceare mapped back to "old" space locations using the mapping table 1100,until the merge/sort operation has completed.

In order to allow the deletion of pages to proceed in a deterministicfashion, the □DELETED□, □END₋₋ PAGE□, □BEGIN₋₋ BIG□ and □END₋₋ BIG□attributes are hashed into a bucket whose tiers are merged last, forexample, bucket 1039 of FIG. 10. Thus, these page related attributeswill not be deleted until all words of the deleted pages have beenprocessed.

The Query Module

The operation of the search engine 140 with respect to the query module50 and the index stream reader objects 60 is now described in greaterdetail. Although FIG. 2, shows the query module 50 interacting withusers via the network 130, it should be understood that the searchengine 140 can also be configured to process locally generated queries.This would be the case where the database index, the client programs,the search engine 140, and the index 70 all reside on a single computersystem, e.g., a PC or workstation.

Query Expressions

Each of the queries 52 can be in the form of an expression of a querylanguage. Terms of the expression can be a single word or metaword,multiple words, or phrases, or even parts of words. For example, thequery expression can be "fruit," meaning find all pages which include atleast the word "fruit." A multiple word query could be paraphrased as:`find all pages including the words "fruit" and "vegetable," meaningfind pages including both the word "fruit" and the word "vegetable."

Phrase

Phrases are multiple words or characters enclosed by quotation marks,for example, "the cow jumped over the moon." In this case, a qualifyingpage must contain the words or characters exactly as indicated in thequoted phrase.

Partial Words

A partial stem-word can be specified with the "*" character, forexample, as "fruit*" to locate pages containing the words fruit, fruity,fruitful, or fruitfly, and so forth.

Query Operators

Logical

In the case where the query expression includes multiple terms, theterms can be related by operators. The operators can be the Booleanoperators AND, OR, NOT.

Positional

Positional operators can include NEAR, BEFORE, and AFTER. The NEARoperator means that a word must be within, for example, ten locations ofanother word. A query "a before b" specifies that the word "a" mustappear before the word "b" in the same page, and the query "a after b"means that the word "a" must appear after the word "b."

Precedence

Expressions can be formed with parenthesis to indicate processingprecedence ordering. For example, the query expression "(vegetable andfruit) and (not (cheese or apple))" locates all pages that include atleast the words "vegetable" and "fruit," but not the words "cheese" or"apple."

Case

In general, the parsing of the individual words of queries is similar tothe parsing done by the parsing module 30. This includes the treatmentof capitalization, punctuation, and accents. Thus, a search for the word"wombat" will also locate pages with the word "WoMbat," or wOmbAT." Thatis, words expressed in lower case characters will match on any otherform of the character such as upper case, accent, etc, since the queryparser will produce the appropriate synonyms.

Punctuation

Since the search engine 140 generally ignores word separators, a term ofthe expression can be specified as an exact phrase by enclosing thecharacters of the phrase within quotes. For example, a query includingthe phrase "is the wombat lost?" must exactly match on the quotedcharacters.

Range-based Values

Query expressions can also include range-based terms, such as dates orsizes. For example, "Jan. 1, 1995-Dec. 31, 1995" means any date in theyear 1995. The handling of range-based values in the index 70 isexplained in greater detail below.

Parsing Queries

As shown in FIG. 12, the query module 50 can represent the queryexpression "(vegetable and fruit) and (not (cheese or apple))" as aquery tree 1200. The bottom level leaf nodes 1210-1213 respectivelyrepresent the basic words "vegetable, fruit, cheese, and apple"(a,b,c,d). The AND node 1220 is applied on the words vegetable andfruit, and the OR node 1221 is applied to the words cheese and apple.The NOT node 1230 is applied on the node 1221, and the AND node 1240joins the two main branches of the tree 1200.

Index Stream Reader Objects

In order to locate pages which are qualified by a query, the querymodule 50 communicates with the index 70 via object oriented interfaces,for example, the index stream reader objects (ISRs) 60. Each ISR object60 is an encapsulation of a data structure and methods which operate onthe data structure. The encapsulated data structure references portionsof the index 70, for example the files 71', 72', 73' of the datastructures 1001 of FIG. 10. Since the query module 50 interfaces witheach object via a single object "handle," the query module 50 does notneed to know the internal workings of the ISRs 60. Furthermore, theobjects can be polymorphic. This means similar objects can be viewed viaa common interface.

As an advantage of the index 70, the search engine 140 can employ a verysmall number of basic types of stream reader objects 60. With these ISRobjects 60, the query module 50 can resolve any query expression.

Object References

As shown in a general form in FIG. 13, an ISR object 60 includes datareferences 1310 and method references 1320. Some of the objects do notneed to use all of the references. The data references 1310 can includea file/object₋₋ pointer 1311, a word 1312, a current₋₋ location 1313, aprevious₋₋ location 1314, and an estimated₋₋ overshoot 1315. The methods1320 referenced can be get₋₋ word 1321, get₋₋ location 1322, get₋₋next₋₋ loc 1323, get₋₋ loc₋₋ limit 1325, close, and for some objects,get₋₋ previous₋₋ loc 1324.

Data References

The file/object₋₋ pointer 1311, for a simple or basic object, referencesthe files 71', 72', and 73' of the data structures 1001. For a complexor compound object, the pointer 1311 references other objects. The word1312 indicates which unique word or metaword is currently being searchedby the ISR object. The current₋₋ location 1313 references a currentlocation of the word during index stream processing. The previous₋₋location 1314 can reference, for some objects, a previously processedlocation.

The estimated₋₋ overshoot 1315 is described in greater detail below withrespect to a compound index stream reader which determines a conjunctionof other index stream readers (isr₋₋ AND). The estimated₋₋ overshoot isused to optimize the scanning of the index by the isr₋₋ AND streamreader object.

Method References

In general, the methods of an object, if successful, produce a TRUEcondition, and possibly a value. If a particular method is not performedsuccessfully, a logical FALSE condition is returned.

Get₋₋ word

The get₋₋ Word method 1321 yields the value of the word 1312. The method1321 can be referenced by the query module 50 as "get₋₋ word isr," where"isr" is the "handle" of the index stream reader object.

Get₋₋ loc

The get₋₋ loc method 1322 yields the current₋₋ location 1313 associatedwith the word of a particular index stream reader, e.g. "get₋₋ loc isr."The two methods 1321 and 1322 have no side effects on the ISRs, e.g.,they return values while leaving pointers unchanged.

Get₋₋ next location

The get₋₋ next₋₋ loc method 1323 advances the current₋₋ location 1313 tothe next immediate location where the word occurs, if there is one,otherwise the method 1323 yields a logical FALSE condition.

Get₋₋ loc₋₋ limit

The get₋₋ loc₋₋ limit method 1325 can have a reference in the form of"get₋₋ loc₋₋ limit isr, target₋₋ location, limit." That is, the get₋₋loc₋₋ limit method 1325 takes three arguments, isr, a target location,and limit location. This method advances the current₋₋ location pointer1313 to a next location which is at least as great as a target location,or alternatively, if that would cause the current₋₋ location 1313 toexceed the limit, the method may do nothing, and return a FALSEcondition.

Close

The method close 1326 deletes the object.

Get₋₋ previous₋₋ loc

The get₋₋ previous₋₋ loc method 1324 produces the previous location of aword with respect to the current location, if there is one, otherwise alogical FALSE condition is returned. This method does not change thecurrent₋₋ location 1313. It should be noted, as explained below, that inthe case of an isr₋₋ and and an isr₋₋ not object, it is not possible todetermine the previous location.

This method is useful to determine the range of locations which are partof a specific page. For example, if the index stream reader object isreading locations for the END₋₋ PAGE metaword, the current and previouslocations define the range of locations of a page.

The Basic Index Stream Reader

A simple or basic isr object operates only on the location entries forone specific word. This means that advancing the current₋₋ locationpointer 1313 is a relatively inexpensive operation. It should be notedthat the current₋₋ location 1313 can only be advanced, and not reversedbecause of the delta value compression. This means, that the get₋₋previous method 1324 can only retrieve the location immediately previousto the current location.

Some query operations may be very time consuming to perform. Forexample, take the query:

find all pages containing "wombat," and not "a the." The word "wombat"will occur relatively infrequent. However, finding pages which do notcontain the phrase "a the" can take many processing steps. Even thoughthe phrase "a the" occurs infrequently, the words "a" and "the"independently will have a high frequency of occurrence. In this case, ifthe get₋₋ loc₋₋ limit method 1325 determines that advancing thecurrent₋₋ location will be expensive, it may do nothing. Therefore, theget₋₋ loc₋₋ limit implementation, may decide not to advance thecurrent₋₋ location 1313, and return a FALSE condition.

As will be demonstrated, the get₋₋ loc₋₋ limit method 1325 has someimportant properties when applied to the index 70. Recall, the get₋₋loc₋₋ limit method advances the current location to a next locationwhich is at least as great as a target location, unless that would causethe current₋₋ location to exceed the limit. This means that the get₋₋loc₋₋ limit method can jump over intermediate locations to reach thetarget location where to resume the scan.

This jumping over locations can be accomplished by having the get₋₋loc₋₋ limit method first scan the summary data structure 73, and thenthe summary data structure 72 to rapidly close in on the targetlocation. By scanning the summary data structures 73 and 72 first, theuncompressing of many delta values of the compressed data structure 71can be skipped.

Since the index 70 has a small number of interfaces, the interfaces canbe highly optimized for searching, since optimization opportunities arewell localized. In addition, the same interfaces that are used forsearching the index can also be used by the merge/sort operation.

Opening Basic ISR Objects

During operation of the search engine 140, ISR objects 60 can begenerated by the query module 50 with an OPEN procedure. In a basicform, the call to the OPEN procedure can be "OPEN isr x." Where "isr"indicates that an index stream reader object is requested for a valuedword (or metaword) x, the OPEN procedure returns the "handle" of theobject and the methods which are included with the object.

During operation, the isr x can return the locations of the word x usingthe method get₋₋ next₋₋ loc 1323 or the get₋₋ loc₋₋ limit method 1325.The locations can be recovered by adding a next delta value to the valueof the previously determined location. It should be understood that inthe case where the index includes multiple tiers 1014, the index streamreaders sequentially progress through the tiers of the bucket into whichthe word x was hashed.

Opening Compound ISR Objects

The OPEN procedure can also generate index stream reader objects whichrelate a combination of previously opened readers. For example, the OPENcall can be of the form "OPEN isr₋₋ type (isr, . . . , isr), where isr₋₋type can be "OR," "AND," or "NOT." and "isr, . . . , isr" are thehandles of previously generated ISR objects.

For example, to perform the search for the union of the words "cheese"or "apple," the query module 50 can do the calls "OPEN isr cheese" and"OPEN isr apple," followed by OPEN isr₋₋ or (isr₋₋ cheese, isr apple),where "isr₋₋ cheese," and "isr₋₋ apple" are the handles of the objectsgenerated by the "OPEN isr x" calls. In this case, the methods of theisr₋₋ OR perform a merge and sort of the locations produced by the isr₋₋cheese and isr₋₋ apple index stream objects. In other words, the isr₋₋OR produces its output from the input of two other ISRs.

To perform the search for the conjunction of the words "vegetable" and"fruit," the calls can be "OPEN isr vegetable," "OPEN isr fruit,"followed by "OPEN isr₋₋ AND (isr₋₋ vegetable, isr₋₋ fruit)". In general,ISR objects can reference any number of other ISR objects to generate anobject oriented representation of, for example, the tree 1200 of FIG. 12which logically represents an input query 52.

Opening ISRs for Metawords

While processing a query, additional index streams can be opened forwords other than those explicitly specified in the terms of a query. Forexample, index stream readers for the metaword attributes □END₋₋ PAGE□,and □DELETED□ are typically opened so that page specific determinationscan be made, e.g., skip over the locations of deleted pages.

Finding Qualifying Pages

FIG. 14 shows a process 1400 for locating pages which contain at leastone occurrence of a particular word, e.g. a query states:

find all pages containing the word "vegetable."

It should be understood that the process 1400 can be adapted to locatepages containing at least one of a set of words. In general, the process1400 performs the search for the union of the words, e.g., "cheese," or"apple".

In step 1410, the OPEN procedure is called to open ISRs for the word"vegetable"(a), and the metaword END₋₋ PAGE (E₋₋ P), e.g., OPEN isr a,isr E₋₋ P. In step 1420, search the index 70 to determine a nextlocation for the word a, e.g., determine loc(a) using the get₋₋ next₋₋loc method of the isr₋₋ a object. Once the next occurrence of the word ahas been located, determine the location (loc(E₋₋ P)) of an END₋₋ PAGEmetaword which is at least loc(a) using the get-loc-limit, in step 1430.In step 1450, select the page identified by loc(E₋₋ P) as a qualifiedpage. In step 1460, advance the location for the a stream to be at leastone greater than loc(E₋₋ P), and repeat step 1420 until the end of the astream is reached and all pages including at least one occurrence of theword a have been selected.

AND Index Stream Reader

An operation of the index stream readers 60 with respect to the logicalAND operation is described with reference to FIGS. 15-17. For examplewith reference to FIG. 15, a user desires to locate pages 200 includingat least one occurrence 1510 of the word (or metaword) a and at leastone occurrence 1530 of the word (or metaword) b. This could be expressedin a query as:

find all pages containing the words "vegetable" and "fruit."

As shown in FIG. 16, open basic readers isr a 1610, isr b 1620, isrEND₋₋ PAGE 1630 for the metaword □END₋₋ PAGE□, as well as a compoundisr₋₋ AND 1640 logically linking the ISRs 1610, 1620, and 1630, in step1710 of process 1700 of FIG. 17. After, the index stream readers havebeen opened, the methods of the isr₋₋ AND reader are referenced toperform the search. This will cause the methods of the basic streamreaders linked by the isr₋₋ AND object to be referenced to findlocations for the specified words.

Index Stream Reader Constraints

The isr₋₋ AND object 1640 is different from the other ISR objects inthat it operates in conjunction with one or more "constraints" 1650. Asdefined herein, constraints give the isr₋₋ AND objects a powerfulmechanism to rapidly scan through multiple location streams.

Recall, each unique word of the index is associated with one set ofincrementally increasing locations, e.g., a location stream. Alsorecall, scanning locations of the compressed data structure 71 of FIG. 9requires the sequential reading of each byte of every location for aparticular word; for many words this can be millions of locations. Thisis required because of the delta value encodings. A next location canonly be determined from a previous location.

Constrained Unidirectional Scanning

Because of the manner in which the locations are compressed, scanningthe compressed data structure 71 can only proceed in one direction,without backing up. If the index 70 is searched at a lowest level, everybyte must be read in sequential order. However, the sampled entries ofthe summary data structures 72-73 can be searched while skipping overmany locations. In fact, the summary data structures can be processed bymethods more efficient than sequential searching, for example, binarysearching methods.

The constraints 1650 enable low-level (inexpensive) procedures toquickly traverse locations by first using the summary data structures72-73 and then the compressed data structure 71 to reach a desiredtarget location without having to invoke higher level (expensive)procedures, or uncompressing an excessive number of delta values.Constrained stream readers provide a substantial performance advantagefor the search engine 140 of FIG. 1.

In a simple form, a constraint can be expressed as:

C(a)≦C(b)±K, where

C(a) means the current location of a word (or metaword) a,

C(b) means the current location of a word (or metaword) b; and

K is a constant.

To find words whose locations are next to each other, the value of K is1, all the constraints can be:

C(a)≦C(b)+1, and

C(b)≦C(a)-1.

For words that are to be "near" each other, the value of K can be ten.

Alternatively constraints can also be in the form:

P(a)≦P(b)±K,

C(a)≦P(b)±K, or

P(a)≦C(b)±K,

where P means the previous location of a, or b. Recall, some ISRs keeptrack of the previously determined location.

Handling Terminating Conditions

In order to correctly handle terminating conditions such as determininga previous location for the first location of a word, or a next locationfor the last location of a word, two additional indicators can be usedin specifying constraints. For example:

C(b)≦C^(E) (b)±K, or

P^(B) (b)≦C(b)±K

where, C^(E) means the index stream is allowed to locate a "next"location at the "end", and P^(B) means the index stream is allowed tolocate a previous location at the "beginning." This convention enablesthe processing of words or phrases associated with the first and lastoccurrence of the word, phrase, or group of words, e.g., a title.

General Form of Constraints

Therefore, more generally, the constraints can be expressed as thefamily:

C|P(a)≦C|P(b)±K,

where the symbol "|" stands for logical OR.

The constraints 1650, in part, determine how the get₋₋ loc₋₋ limitmethod determines a next location for the isr₋₋ AND object. Logically,the constraints operate as follows.

Clearly, for a constraint to be satisfied, the value of the right side(loc(b)±K) must be greater than or equal to the value of the left side(loc(a)). This means that the current location of the right side stream,adjusted by K, must be at least equal to the location of the left sidestream. If the constraint is unsatisfied, the right side stream is"behind."

Satisfying Constraints

The constraint could be satisfied by "backing-up" the left side stream.However, because of delta value compressing, it is only possible to movethe streams forward. Therefore, the only way to satisfy a constraint isto advance the right side stream. A simple way to do this is to use theleft side location as, at least, a minimal target location for the rightside stream using the get-loc-limit method. This is intended to satisfythe constraint, although it may make other constraints false. Note, if astream is at the last location, the scanning process can be terminated.

Favoring Selected Constraints

As stated before, most queries invoke multiple stream readers, eachpossibly using multiple constraints 1650. Therefore, by carefullydeciding which of the constraints to satisfy first, the scanning of theindex can be accelerated. For example, a constraint which moves thecurrent location forward by many thousands, should be favored over onewhich only increases the current location by a small amount. When allconstraints are satisfied, the query has been resolved for a particularpage.

Now again with reference to FIG. 17, after opening the ISRs, in step1720, determine a next location (loc(a)) 1510 (FIG. 15) of the word a.Then, in step 1730 using the isr₋₋ E₋₋ P object 1630, determine a nextlocation (loc(E₋₋ P)) 1520 of the metaword □END₋₋ PAGE□. In step 1740,determine the previous location (ploc(E₋₋ P) 1519 of the metaword □END₋₋PAGE□ using, for example, the get₋₋ prev₋₋ loc method 1324 of the isr₋₋E₋₋ P.

Then, in step 1750, determine a next location (loc(b)) of the word bconstrained to be greater than the previous □END₋₋ PAGE□ location(ploc(E₋₋ P)) 1519, but less than or equal to the next □END₋₋ PAGE□location (loc(E₋₋ P)) 1520. This constrained search can be performed bythe get₋₋ loc₋₋ limit method 1325 using the location 1519 of theprevious END₋₋ PAGE metaword as the constraint value, then a test can beperformed on the next loc(E₋₋ P) 1520.

Thus, a sample search for two words within the same page can be boundedby the constraints;

P(E₋₋ P)≦C(a)-1, and

C(a)≦C(E₋₋ P), for word a, and

P(E₋₋ P)≦C(b)-1, and

C(b)≦C(E₋₋ P), for word b.

When all of these constraints are satisfied, a qualified page has beenfound.

These constraints are obviously dependent on how a specificimplementation indicates page boundaries. Other constraints can beformulated for different page boundary designations.

Should the query include the further restriction that the word "cooking"(c) should be in a title field, the search can be conducted by openingthe index stream reader objects for the word c, and the metawords□BEGIN₋₋ TITLE□ (B₋₋ T) and ═END₋₋ TITLE□ (E₋₋ T). Furthermore, theisr₋₋ AND object 1640 is supplied with the additional constraints:

P(B₋₋ T)≦C(c),

C(c)≦C(E₋₋ T), and

C(E₋₋ T)≦CE(B₋₋ T).

Note the use here of terminating indicators on the constraints toproperly handle end-point conditions.

Finding Pages with Adjacent Query Words

FIG. 18 shows how the constraints 1650 of FIG. 16 can be used to furtherrefine the selection of pages so that pages are only selected if theword b 1810 is immediately preceded by the word a 1820, e.g., the phrase"a b". Constraint 1830, e.g., C(a)≦C(b)-1, specifies that the word amust occur somewhere before the word b. A constraint 1840, e.g.,C(b)≦C(a)+1, specifies that the word a must come at most one word beforethe word b. Satisfying both constraints demands that the words a and bbe immediately adjacent in locations.

Finding Pages with Words Near Each Other

By making the constant value of the constraints larger than 1, e.g.,ten, the NEAR operator can be implemented. For example, the constraints:

C(a)≦C(b)+10, and

C(b)≦C(a)+10

locates words within 10 of each other. Note, the constraints do notspecify the relative order of the words a and b.

Operation of isr₋₋ AND Index Stream Reader.

In general, with the isr₋₋ AND object, the operation is as follows. Forany given set of current locations of the words of the input streams,determine if any one constraint is unsatisfied, and satisfy thatconstraint. Better performance can be obtained by selecting theconstraint which is likely to advance the current location the farthest.

A constraint can be satisfied by calling get₋₋ loc₋₋ limit using the sumof the left side value and -K as the target location. As stated before,this may dissatisfy other constraints. Therefore, this process isrepeated until all constraints are satisfied, which indicates a match,or until a terminating condition is reached. Note, the get₋₋ loc₋₋ limitmay search the summary data structures 72-73 before the compressed datastructure 71.

NOT Index Stream Reader

The isr₋₋ NOT method produces all locations where the specified worddoes not occur. Because of the potentially large number of locationswhich may qualify, the isr₋₋ NOT is designed to do a "lazy" evaluationof locations. Lazy means the identification of locations is deferreduntil a last possible moment. Typically, the isr₋₋ NOT reader is usedwith compound stream readers that match for a subset of END₋₋ PAGElocations.

Optimizing the Scanning of the Stream Readers

While processing queries, many constraints may need to be evaluated orsatisfied in order to locate qualifying pages. In general, the time toresolve a query is proportional to how fast the index can be searchedfor a given number of ISRs. Therefore, each ISR of FIG. 13 alsomaintains the estimated₋₋ overshoot value 1315. The overshoot is anestimate at a search rate.

Overshoot

The estimated₋₋ overshoot 1315 is determined as follows. Each time thatan ISR determines a new current₋₋ location 1313 using the get₋₋ loc₋₋limit method 1325, the running average number of locations advancedbeyond the initial target location is determined. The target location isspecified as an argument for the get₋₋ loc₋₋ limit method. Theestimated₋₋ overshoot 1315 is a relative indication of how "fast" aparticular index stream reader is advancing through the locations.

For example, if at any given moment there are a number of unsatisfiedconstraints, the best constraint to satisfy first is the one which willmaximize the current location of the isr advanced. The current locationis maximized when the sum of the constraint's target value (that is, thevalue of the left-hand side of the constraint, minus K) and theestimated₋₋ overshoot 1315 of the stream of the right-hand side is amaximum.

Distinguished Streams

It is also important to correctly handle queries which on their face mayseem to be identical. For example, the queries:

find all pages containing both the words a and b; [1]

find all a where b is also in the same page; and [2]

find all b where a is also in the same page. [3]

All three queries fundamentally use the ISRs, isr₋₋ a, isr₋₋ b, andisr₋₋ E₋₋ P and use the same constraints. However, it is important thatthe correct stream is selected for advancement when all constraints aresatisfied, e.g., when a qualifying page or record has been identified.

For query [1] the END₋₋ PAGE index stream needs to be advanced first,e.g., get₋₋ next E₋₋ P, since the user is interested in "pages." Forquery [2], the a stream should be first advanced when all constraintsare satisfied, otherwise matches are going to be erroneously missed. Forquery [3], the b stream is first advanced if all constraints aresatisfied. The stream that is being advanced first is called thedistinguishing stream. If this convention is followed, qualifying pageswill not be missed.

Using Big Page Attributes

The processing of queries can further be accelerated by taking note ofthe fact that a relatively small number of pages are considerably largerthan most pages. Therefore, relatively large pages have the additionalattributes of □BEGIN₋₋ BIG□ and □END₋₋ BIG□. Performance can be improvedby focusing on the "big" metaword streams, because the "big page"attributes occurs relatively infrequently compared to the □END₋₋ PAGEE□attribute.

The improvement, which assumes that big pages include more than 16Kwords, is implemented as follows. During query processing consider thefollowing two additional constraints, assuming that the query is lookingfor a match on the words a and b:

C(a)≦C(b)+16384, and

C(b)≦C(a)+16384.

These two constraints require that the words a and b must be within16384 locations of each other. This is very similar to the constraintsthat would be used in resolving a proximity query. Since theseconstraints do not require an evaluation of the isr₋₋ E₋₋ P. the indexcan be traversed much more rapidly.

During operation, a determination is made if the words a and b arewithin a "big" page, e.g., a page with more than 16K words. If thiscondition is false, then the words must be in a "small" page. In thiscase, enable the above two constraints. Otherwise, if the condition istrue, then disable the two constraints.

Since "big" pages occur relatively infrequently, there will only be arelatively small number of locations associated with the metawords forthe attributes □BEGIN₋₋ BIG□ and □END₋₋ BIG□. Consequently, theestimated₋₋ overshoot for the stream readers associated with thesemetawords will be relatively high, for example, at least 16K. It hasbeen determined that the addition of these two constraints alone canspeed up traversal of the index 70 by as much as a factor of two.

Queries Using Range-Based Values

The index 70, and processes which operate thereon, not only can be usedto search for "words" having discrete literal values as described above,but also to locate words within a range of numeric values, such asintegers. For example, the page attributes □SIZE□ 253 can be expressedas an integer value, as can the attribute □DATE□ 254, e.g., as a"Julian" date. There are advantages in allowing users to state a querygenerally in the form of:

find a word a in pages which were generated after Dec. 31, 1995, or

find a word a in pages including 57 to 70 words.

Range-Based Metawords

The number line begins with integers 1 and 2, and as shown in FIG. 19,has a portion . . . , 56, 57, . . . ,70, 71, . . . , and so forth. Theintegers represent values on which range-based query operations aredesired, e.g., dates, and page sizes. The ranges can be selected from aninterval of a predetermined size, e.g., 16, 4K, 512K, etc.

The predetermined interval can be used to generate a plurality of setsof subintervals. For example, a first set of subintervals L1-L4, asshown in FIG. 19. The first set, e.g., level L1 has one subinterval foreach integer value.

The subintervals can be represented by literal metawords, e.g., 1₋₋ 1,2₋₋ 1, . . . , 56₋₋ 1, 57₋₋ 1, . . . , 70₋₋ 1, 71₋₋ 1, etc, where thefirst number represents the starting value, and the second number lengthof the interval. For clarity, the usual "□" designation of metawords isnot used.

The next subset of intervals, for example, the intervals of the level L2shows groups of adjacent subintervals of the previous set, e.g., levelL1. In one grouping, the size of the subintervals doubles for each nextset, until the entire interval is covered in one subinterval, e.g., 1,2, 4, 8 etc. The combinations of the second level L2 can be representedby the metawords 2₋₋ 2, 4,₋₋ 2, . . . , 56₋₋ 2, 58₋₋ 2, . . . , 70₋₋ 2,71₋₋ 2, and so forth.

A next set, level L3, can then be encoded by metawords representing theadjacent groups of the previous level 2 as 4₋₋ 3, 8₋₋ 3, . . . , 56₋₋ 3,60₋₋ 3, 64₋₋ 3, 68₋₋ 3, size "four." Additional levels can be encoded8₋₋ 4, 16₋₋ 4, . . . , 56₋₋ 4, 64₋₋ 4, . . . , and so forth. The numberof levels needed to encode a range of N integers, with doubling ofsizes, is a function of log₂ N, where N is the number of possiblerange-based integer values to be encoded.

During parsing of the pages by the parser 30, if a word 1962 with arange attribute is recognized, encode the value of the word ("62") asfollows. First, generate a [location, word] pair as one normally wouldfor any word, for example, the pair [location, 61]. Second, generaterange-based metawords pairs for all possible subintervals which includethe word. For example, using FIG. 19 as a reference, the vertical line1920 passes through the word "62" and all combinations which include theword in levels L1-L4.

Therefore, the additional metaword pairs which will be generated include[location, 62₋₋ 1], [location, 62₋₋ 2], [location, 60₋₋ 3], and[location, 56₋₋ 4], all for the same location as the word "62".Similarly, the word ("71") 1971 could be encoded as [loc, 71], [loc,71₋₋ 1], [bloc, 70₋₋ 2], [loc, 68₋₋ 3], and [loc, 64₋₋ 4], and so forth.The succeeding values for each level can be determined by bit shift andbit clear operations using the literal values.

During operation, a range-based query specifies:

find all pages having a size in the range 57 through 70 bytes.

The range "57-70" can be converted to a Boolean search for therange-based metawords in the desired range. That is, search the wordentries corresponding to the subintervals whose concatenation exactlyspans the range of the search term. If the selected metawords whichexactly span the range are minimized, then the search time is alsominimized since a minimum number of index stream readers need to beused.

Therefore, the metawords which are to be used for scanning the index areselected from the "bottom" level up. For example, the metawords 57₋₋ 1,58₋₋ 2, 60₋₋ 3, 64₋₋ 3, 68₋₋ 2, and 70₋₋ 1 exactly span the range"57-70" 1910 as shown by the cross hashing.

With a log₂ based encoding at most 2L-1 metawords need to be searched ifL levels are used for the expression of the range-based values. Juliandate ranges can adequately be handled with sixteen levels of encoding,e.g., at most thirty-one metawords during a query. It should beunderstood that this technique could be expanded to handle fixed-pointnumbers as well. Other groupings of adjacent values can also be used,for example threes, fours, etc.

As an advantage of this encoding, uniform data structures andinterfaces, e.g., the index 70 and stream readers 60, can be used forencoding and searching a range of values without a substantial increasein data storage and processing time. In addition, range-based searchesbenefit from the optimization improvements implemented fordiscrete-valued searches.

The Ranking of Qualified Pages

The ISRs 60, as described above, produce a list of identified pages 200which are qualified by the queries 52. Since the number of pages indexedby the search engine 140 can be rather large, it is not unusual thatthis list may include references to tens of thousands of pages. This isfrequently the case for queries composed by novice users because of therather imprecise nature in which their queries are composed.

Therefore, there needs to be a way to rank order the list in ameaningful manner. A modified collection frequency weighing techniquecan be used to rank the pages. Then, the list can be presented to theusers in a rank order where the pages having a higher rank are presentedfirst.

Word Weighing

To perform the ranking, each indexed word is assigned a weight w. Ascore W for a page is the sum of the weight w for each occurrence of aword specified in the query which also appears, or in the case of theNOT operator does not appear, in a qualified page. Thus, should a pageinclude all words, a higher score W is produced. Also, should a wordwith a relatively high weight appear frequently in a qualified page,that page will receive a yet higher score. Low weight words willminimally contribute to the score of a page.

As shown in FIG. 20, a word weighing table 2000 can be maintained. Thetable 2000 contains an entry 2001 for each unique word 2010 of the index70. Associated with each word 2010 is its weight w 2020, e.g., w(a),w(aa), and so forth. One way to determine the weight w of a word in theindex 70 can be:

w=log P-log N,

where P is the number of pages indexed, and N is the number of pageswhich contain a particular word to be weighed. Then, should a particularword, for example, "the," appear in almost every page, its weight w willbe close to zero. Hence, commonly occurring words specified in a querywill contribute negligibly to the total score or weight W of a qualifiedpage, and pages including rare words will receive a relatively higherscore.

Dealing with Common and Rare Words

One problem with this technique is that a query may include both commonand rare words. For example, a query is stated as:

find all pages including the words "an" and "octopus."

Finding the pages including the word "octopus" will proceed quickly.However, finding the pages which include the word "an" will require asubstantial amount of processing because words such as "an" may appearat millions of locations.

Word Lists

Therefore, as shown in FIG. 21, first and second related query wordlists 2110 and 2120 are maintained for each query processed. Initially,the first list 2110 includes entries 2111-2116 for each word specifiedin a query, for example:

find all pages including the words "an octopus lives in the sea."

In this case, the list 2110 initially includes an entry for every basicindex stream reader which is used to read locations where the word xappears.

Ranking List

In addition, as shown in FIG. 22, a ranking list 2200 of qualified pagesis maintained. The ranking list 2200 includes one entry 2201 for eachqualified page. Each entry 2201 includes an identification (page₋₋ id)2210 of a qualified page, and a score (W) 2220 associated with theidentified page. The entries 2201 are maintained in a rank orderaccording to the scores 2220.

The Top 500

The number of entries 2201 in the list 2200 can be limited to somepredetermined number, for example, five hundred. This means that onlythe pages having the "top 500" scores will be presented to the user. Itshould be understood, that this number can vary, depending on a specificimplementation, or perhaps, user supplied parameters.

During operation, identifications 2210 and scores 2220 of qualifiedpages are entered into the list 2200 in W rank order. When the rankinglist 2200 fills up, it contains 500 entries 2201. At this point, adetermination can be made to see if it is possible for any of the words2111-2116 of the first list 2110 having a relative low weight w, e.g.,"an," "in," and "the" could possibly promote any as yet unqualified pageto the "top 500" list 2200.

For example, if the score of the lowest ranked page is 809,048, and theweight of the low weight words is about 0.0000001, then it is impossiblefor any of the low weight words to promote an as yet unqualified page tothe "top 500" list 2200.

In this case, the words with a low weight w, e.g., "an" 2111, "in" 2114,and "the" 2115 of the list 2110 are deleted (X) from the first list 2110and entered as entries 2121-2123 of the second list 2120. Now, thescanning of the index can proceed with a focus on the words 2112, 2113,and 2116 remaining in the first list 2110.

If a page is subsequently qualified because it includes a highlyweighted word, then the weights of the words of the second list 2120 arestill taken into consideration in order to determine the correct score Wof the page. However, index stream readers scanning for locations of lowweight words will be disabled while first locating pages including wordshaving a relatively high weight w. Partitioning words into multiplelists 2110 and 2120 according to their weight greatly improves theperformance of the search engine 140.

Concurrently, it is also possible to limit the amount of weight a highfrequency word (low weight) can contribute to the scores 2220 of any onepage. Thus, pages which have been deliberately constructed to contain alarge number of low weight words will not necessarily be promoted to thetop 500 list 2200.

However, with this approach it may still take a substantial amount ofprocessing to fill the "top 500" ranking list 2200. This is due to thefact that the list 2200 will initially be filled with entries ofqualified pages whose scores may be derived from low weight words.

Statistical Projection Ranking

As a refinement, a statistical projection technique can be employed toaccelerate the movement of low weight words from the first list 2110 tothe second list 2120. The statistical projection is based on theassumption that in an extremely large index the relative frequency ofoccurrence of the various words over the pages is constant. For example,the frequency of occurrence of the words "the" in a first small fractionof the indexed pages 200 is the same as in the remaining pages.

Therefore, while processing a query, as soon as a small fraction, forexample, 3%, of the index 70 has been processed, a statisticalprojection is made to see if any word on the first list 2110 couldsolely promote a page to the top 500 list 2200 based on the scoresobtained for the first 3% of the index. In this case, the low weightword of the first list 2110 is immediately moved to the second list 2120even if the top 500 list has not yet been filled with entries 2201.

Safety Margins for Statistical Projection

As a further refinement, the following safety margin can be built intothe statistical projection. After 3% of the index 70 has been processed,a determination can be made to see if the top 500 list 2200 is at least,for example, 15% filled, e.g., the list 2200 includes at least 75entries. This will make it highly likely that by the time the end of theindex is reached, the ranking list 2200 could probably have about 2475(100/3×75) entries. This number is much larger than 500. Consequently,moving words from the first list 2110 to the second list 2120 based on asmall sample will more than likely produce the correct result,particularly if the "small" 3% sample is based on words indexed fromperhaps a million pages or more.

By the time that all pages of the index have been searched during asequential scan, it can easily be determined if the statisticalprojections were made correctly. If not, the query can be reprocessedwith increased safety margins.

A further improvement can be made for queries which contain more thanone word. In this case, while determining the score for a qualified pagebased on the weights of a low frequency word, also determine which wordsof the second list 2120 have not yet been detected in the page. Then,determine if the score would qualify the page for the top 500 list 2200even if the page would include any or all of the low frequency words. Ifit would not, then the page can be discarded immediately without havingto search for low weight words.

Furthermore, if the entries of the lists 2110 and 2120 are maintained inan order according to their weights w, then words which are more likelyto produce a qualifying score will be processed first. Note, words witha greater weight are also ones with fewer locations to process, thisincreases the chance that many locations of "expensive" to process lowweight words need to be processed at all.

Other Rankings

So far, the ranking of qualified pages for presentation to the users hasbeen based on processing with the index stream reader isr₋₋ E₋₋ P. Thatis, the score for a particular qualified page is determined from thewords having locations less than or equal to the location of a nextEND₋₋ PAGE attribute, and having a location greater than the location ofa previous END₋₋ PAGE. It is also possible to combine ranking operationswith a Boolean query, that only pages or records that match the Booleanquery are ranked.

Optimization of Index in Response to Queries

Even with the efficiencies of the index structures and processes asdescribed above, it may still be the case that some queries consume asubstantial number of processing cycles. This may be a particularproblem if a phrase, e.g., a concatenation of immediately adjacentwords, of a slow-to-process query appears frequently. This is normal forthe Web, "hot" topics get a lot of attention.

For example, a frequent and slow to process query may include the termsNetscape 1.2. Recall, the parser 30 would parse the term 1.2 as twowords separated by a punctuation mark (.). Because the words "1" and "2"separately will occur relatively frequently, a large number of locationswill be associated with these words.

The query module 50 has feed-back capabilities. This means, as anadvantage, that the query module 50 itself can also generate new entriesfor the index 70. This feature can be implemented as follows.

The Query Journal

As shown in FIG. 23, the query module 50 maintains a journal or loggingfile 2300 while operating. Each entry 2301 of the log 2300 records aphrase 2310, a location 2320 of the phrase, and the cost 2330 ofprocessing the phrase. Periodically, perhaps once a day, the log 2300 isprocessed. For phrases having a relatively high processing cost, e.g.,the phrase "1.2", a new metaword is dynamically placed in the index 70.The metaword is a concatenation of the words of the phrase, for example,□1.2□. The location can be the location associated with the first wordof the phrase.

Once the synonymous "phrase" metaword has been placed in the index 70,searches for the phrase can be greatly accelerated since only a singleISR, for example, isr₋₋ 1.2, needs to used. Prior to the existence ofthe dynamically generated metaword, at least three ISRs (isr₋₋ 1, isr₋₋2, and isr₋₋ AND (isr₋₋ 1, isr₋₋ 2), plus several constraints wererequired in order to resolve the term "1.2." Also, the word "1.2" willhave fewer associated locations.

After the metaword has been placed in the index 70, the parser 30 canalso recognize entries placed in the index 70 by the query module 50, inaddition to indexing the words of the phrase separately as it normallywould. Therefore, as an advantage, the search engine 140 isself-optimizing in response to the query load.

Duplicate Pages

As stated above, the search engine 140 is particularly suited forindexing a large number of information records, such as the manymillions of pages 200 of the World-Wide-Web. Because there are so manypages, and because it is relatively easy to copy pages, the same pagemay frequently appear at different addresses as "duplicate" pages.

A duplicate page is defined as a page having a different address (URL),but having an identical fingerprint as a previously indexed "master"page. It is estimated that as many as 25% of the Web pages may beduplicates of other pages. Therefore, the search engine 140 is providedwith means for economically handling duplicate pages.

Fingerprints

As shown in FIG. 24, while parsing a current page, in step 2410 of aprocess 2400, first determine the fingerprint 255 of the current page.In step 2420, compare the fingerprint 255 of the current page with thefingerprints of previously indexed pages. Note, with the index structure70 as described above, this is can be done by performing a search in theindex 70 for the metaword which expresses the value of the fingerprint.

If there is no identical fingerprint entry in the index 70, then thecurrent page is different, and the current page can be parsed andindexed as a master page in step 2430. Otherwise, if the current page isa duplicate, e.g., it has the same content as a previously indexed page,then, generate the pairs, [location, □FINGERPRINT□], and [location,□ADDRESS□] in step 2440. The □FINGERPRINT□ metaword can be recognizablymarked to indicate that it is a duplicate, and not a master. Becauseonly one copy of a master page is indexed, managing duplicate pageswhich are deleted, or no longer available, becomes a problem.

Deleting Duplicate Pages

FIG. 25 shows a process 2500 for deleting pages. In step 2510, determineif the page to be deleted is a master page. If true, then generate areissue request 2521 in step 2520 for the automated browser 20 of FIG. 2using the address (URL) of the next recorded duplicate page. Then, instep 2530, promote the next duplicate page to be a master page. In step2540, generate a "deleted" metaword pair [location, □DELETED□], wherelocation is the location of the last word of the page to be deleted.Otherwise, if false, i.e., this is not a master page, then in step 2550,determine if the page to be deleted is the next recorded duplicate ofthe page to be deleted and there is no master page. Proceed with step2520 if true. Otherwise, if false, proceed with step 2540.

Reissue Requests

The intent of the reissue request 2521 is to retrieve a copy of the pageto be deleted, then the content of the retrieved copy can be reindexed.Note that there may be several reissue requests outstanding for aparticular deleted page. This is because the behavior of the Web isundeterministic.

Requests may not be honored, sites storing copies of deleted pages maybecome unavailable, or the requests or replies to the requests are lost.Pages previously available may move behind a firewall at a later time.That is, delivery of pages over the Web is not guaranteed. Also, aduplicate page can be deleted before a copy of the master page can besuccessfully retrieved.

Dealing with Responses to Reissue Requests

FIG. 26 shows a procedure 2600 for correctly processing copies of pagesreceived in response to reissue requests 2521 generated by the procedure2500 of FIG. 25. In step 2610, determine if there is a master for thecopy. If false, then determine if the next duplicate of the copy is notdeleted in step 2620. If true, then in step 2630, delete the duplicatepage, and add the copy as the master in step 2640. If a master pagealready exists when the copy is retrieved, discard the copy in step2650. This can happen when several reissue requests are generated beforethe master page is reconstructed.

Although specific features of the invention are shown in some drawingsand not others, this is only for the convenience of describing eachfeature. Those skilled in the prior art will appreciate that theinvention may be practiced in other ways while still remaining withinthe scope and spirit of the appended claims.

I claim:
 1. A system for indexing stored information, comprising:aprocessor configured to parse the stored information into indexablewords, each indexable word representing a portion of the storedinformation [and (ii)] or an attribute of one or more portions of thestored information; and a memory configured to store index entries, eachindex entry including a word entry representing a unique one of theindexable words and one or more location entries, each of the one ormore location entries indicating a respective location of the unique oneof the indexable words within the stored information.
 2. The system asrecited in claim 1, wherein the stored information is stored as aplurality of pages of information.
 3. The system as recited in claim 2,wherein the plurality of pages are Web pages of the INTERNET.
 4. Thesystem as recited in claim 2, wherein each of the plurality of pages hasa unique URL (universal record locator).
 5. The system as recited inclaim 4, wherein at least one of the plurality of pages includes a URLlink to another of the plurality of pages.
 6. The system as recited inclaim 2, wherein each of the one or more location entries indicates therespective location of the unique one of the indexable words within theplurality of pages.
 7. The system as recited in claim 1, wherein thestored information is stored in at least one storage device.
 8. Thesystem as recited in claim 7, wherein the at least one storage device ismultiple storage devices connected to each other by a communicationsnetwork.
 9. The system as recited in claim 1, further comprising:acommunication interface configured to receive the stored information.10. The system as recited in claim 9, wherein the processor is furtherconfigured to fetch batches of specified information, and the storedinformation received by the communication interface is the fetchedbatches of specified information.
 11. The system as recited in claim 10,wherein the specified information is a plurality of pages of thespecified information.
 12. The system as recited in claim 11,wherein:the plurality of pages are Web pages of the INTERNET, each ofthe Web pages having a unique URL (universal record locator) and atleast one of the Web pages includes a URL link to another of the Webpages; and the Web pages are fetched in accordance with the unique URLsand the URL links.
 13. The system as recited in claim 1, wherein theprocessor is further configured to parse the stored information bysequentially partitioning the stored information into the indexablewords.
 14. The system as recited in claim 1, wherein:the storedinformation is a stored plurality of pages of information; and eachindexable word represents a portion of one of the plurality of pages oran attribute of one or more portions of one of the plurality of pages.15. The system as recited in claim 1, wherein the processor is furtherconfigured to fetch the stored information prior to parsing.
 16. Thesystem as recited in claim 1, wherein the processor is furtherconfigured to sequentially assign locations to the indexable words asthey are parsed.
 17. The system as recited in claim 1, wherein:thestored information is stored on the Web of the INTERNET; and each of theone or more location entries indicates the respective location where theunique one of the indexable words occurs in the Web.
 18. The system asrecited in claim 1, wherein the processor is further configured to parsea query into terms and operators relating to the terms, to read alocation entry of an index entry having a word entry representing one ofthe terms of the query, and to direct a presentation of segments of thestored information in which the one term is located.
 19. The system asrecited in claim 18, wherein the stored information is stored as aplurality of pages of information and the segments of the storedinformation in which the one term is located are those of the pluralityof pages in which the one term is located.
 20. A method for indexingstored information, comprising the steps of:parsing the storedinformation into indexable words, each indexable word representing aportion of the stored information or an attribute of one or moreportions of the stored information; and storing index entries, eachindex entry including a word entry representing a unique one of theindexable words and one or more location entries, each of the one ormore location entries indicating a respective location of the unique oneof the indexable words within the stored information.
 21. The method asrecited in claim 20, wherein the stored information is stored as aplurality of pages of information.
 22. The method as recited in claim21, wherein the plurality of pages are Web pages of the INTERNET. 23.The method as recited in claim 21, wherein each of the one or morelocation entries indicates the respective location of the unique one ofthe indexable words within the plurality of pages.
 24. The method asrecited in claim 20, further comprising the step of:fetching a batch ofthe stored information prior to parsing.
 25. The method as recited inclaim 24, wherein the batch of stored information is a plurality ofspecified pages of the stored information.
 26. The method as recited inclaim 25, wherein:plurality of specified pages are Web pages of theINTERNET, each of the Web pages having a unique URL (universal recordlocator) and at least one of the Web pages including a URL link toanother of the Web pages; and the Web pages are fetched in accordancewith the unique URLs and URL links.
 27. The method as recited in claim20, wherein the stored information is parsed by sequentiallypartitioning the stored information into the indexable words.
 28. Themethod as recited in claim 20, wherein:the stored information is in theform of a plurality of pages; the portion of the stored information is aportion of one of the plurality of pages; and the attribute of one ormore portions of the stored information is an attribute of one or moreportions of one of the plurality of pages.
 29. The method as recited inclaim 20, further comprising the step of:fetching the stored informationprior to parsing.
 30. The method as recited in claim 20, furthercomprising the step of:sequentially assigning locations to the indexablewords as they are parsed.
 31. The method as recited in claim 20,wherein:the stored information is stored on the Web of the INTERNET; andeach of the one or more location entries indicates the respectivelocation where the unique one of the indexable words occurs in the Web.32. The method as recited in claim 20, further comprising the stepsof:parsing a query into terms and operators relating to the terms;reading a location entry of an index entry having a word entryrepresenting one of the terms of the query; and presenting a segment ofthe stored information in which the one term is located.
 33. The methodas recited in claim 32, wherein the stored information is in the form ofa plurality of pages and the segment of the stored information in whichthe one term is located is a page within the plurality of pages in whichthe one term is located.
 34. A system for indexing pages of information,the pages of information stored in one or more computers, the systemcomprising:a communication interface for receiving a plurality of thepages; a parser for sequentially partitioning the plurality of receivedpages into indexable words, each indexable word representing a portionof one received page or an attribute of one or more portions of onereceived page, the parser sequentially assigning locations to theindexable words as they are parsed; a memory for storing index entries,each index entry including a word entry representing a unique one of theindexable words and one or more location entries, each of the one ormore location entries indicating a location of the unique one of theindexable words within the plurality of received pages; a query modulefor parsing a query into terms and operators relating the terms; asearch engine for reading a specified index entry, the specified indexentry having a word entry corresponding to at least one of the terms ofthe query; and a display module for presenting those of the plurality ofpages which are located in accordance with the one or more locationentries of the specified index entry.